package com.iscreen.utils.db.connection;

import java.sql.Connection;

import com.iscreen.utils.db.query.Query;
import com.iscreen.utils.exceptions.IScreenException;

public class DBConnection
{
	private Connection connection;
	private DBErrorHandler errorHandler;

	protected DBConnection(Connection connection, DBErrorHandler errorHandler)
	{
		super();
		this.connection = connection;
		this.errorHandler = errorHandler;
	}
	
	public Connection getConnection()
	{
		return connection;
	}
	
	public Query createQuery(String sql) throws IScreenException
	{
		return new Query(connection,sql,errorHandler);
	}
	
	
}
